package com.cloud.neo4j.business.neo4j.car.entity;

import com.cloud.neo4j.business.neo4j.car.entity.base.BaseEntity;
import com.cloud.neo4j.business.neo4j.car.entity.business.PersonBaseEntity;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import org.springframework.data.neo4j.core.schema.Node;
import org.springframework.data.neo4j.core.schema.Property;
import org.springframework.data.neo4j.core.schema.Relationship;

import java.util.List;

/**
 * person业务类
 * @date 2022-05-26
 * @author 刘房
 */
@Node("Person")
@Data
public class PersonEntity extends BaseEntity {

    /**姓名*/
    @Property
    private String name;
    /**出生年份*/
    @Property
    private Integer born;

    @Relationship(type = "ACTED_IN")
    @JsonProperty("参加")
    private List<MovieEntity> movieEntityList1;

    @Relationship(type = "DIRECTED")
    @JsonProperty("指导")
    private List<MovieEntity> movieEntityList2;

    @Relationship(type = "PRODUCED")
    @JsonProperty("导演")
    private List<MovieEntity> movieEntityList3;
}
